package com.java.module.fire.service.impl;

import java.util.List;
import com.java.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.java.module.fire.mapper.ApplyMapper;
import com.java.module.fire.domain.Apply;
import com.java.module.fire.service.IApplyService;

/**
 * 报名Service业务层处理
 * 
 * @author Administrator
 * @date 2025-02-10
 */
@Service
public class ApplyServiceImpl implements IApplyService {
    @Autowired
    private ApplyMapper applyMapper;

    /**
     * 查询报名
     * 
     * @param applyId 报名ID
     * @return 报名
     */
    @Override
    public Apply selectApplyById(Long applyId) {
        return applyMapper.selectApplyById(applyId);
    }

    /**
     * 查询报名
     *
     * @param apply 报名
     * @return 报名
     */
    @Override
    public Apply selectApplyOne(Apply apply) {
        return applyMapper.selectApplyOne(apply);
    }

    /**
     * 查询报名列表
     * 
     * @param apply 报名
     * @return 报名
     */
    @Override
    public List<Apply> selectApplyList(Apply apply) {
        return applyMapper.selectApplyList(apply);
    }

    /**
     * 新增报名
     * 
     * @param apply 报名
     * @return 结果
     */
    @Override
    public int insertApply(Apply apply) {
        apply.setCreateTime(DateUtils.getNowDate());
        return applyMapper.insertApply(apply);
    }

    /**
     * 修改报名
     * 
     * @param apply 报名
     * @return 结果
     */
    @Override
    public int updateApply(Apply apply) {
        apply.setUpdateTime(DateUtils.getNowDate());
        return applyMapper.updateApply(apply);
    }

    /**
     * 批量删除报名
     * 
     * @param applyIds 需要删除的报名ID
     * @return 结果
     */
    @Override
    public int deleteApplyByIds(Long[] applyIds) {
        return applyMapper.deleteApplyByIds(applyIds);
    }

    /**
     * 删除报名信息
     * 
     * @param applyId 报名ID
     * @return 结果
     */
    @Override
    public int deleteApplyById(Long applyId) {
        return applyMapper.deleteApplyById(applyId);
    }
}
